package java_1_8.abstract_test;

abstract class A{
    public A(){
        this.print();
    }
    public abstract void print();//抽象方法
}
public class B extends A{
    int num=10;
    public B(int num){
        this.num=num;
    }
    @Override
    public void print() {
        System.out.println("num="+this.num);
    }

    public static void main(String[] args) {
        new B(100);
    }
}
